home *** CD-ROM | disk | FTP | other *** search
-
- #include <sys/socket.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
-
- #define MAX_TEXT 2048
-
- #define MAX_SOCKET_PACKET_SIZE 1024 /* Wild guess. */
- #define DESIRED_SOCKET_PACKET_SIZE 800
-
- #define MESSAGE_FLUSH ((char*)NULL)
-
- struct interactive {
- int socket;
- struct object *ob; /* Points to the associated object */
- struct sentence *input_to; /* To be called with next input line ! */
-
- long window;
- struct sockaddr_in addr;
-
- char *prompt;
- int closing; /* True when closing this socket. */
- int do_close; /* This is to be closed down. */
- char text[MAX_TEXT];
- int text_end; /* first free char in buffer */
- int text_start; /* where we are up to in player cmd buffer */
- struct interactive *snoop_on, *snoop_by;
- int noecho; /* Don't echo lines */
- int last_time; /* Time of last command executed */
- char *default_err_message; /* This or What ? is printed when error */
- #ifdef ACCESS_RESTRICTED
- void *access_class; /* represents a "cluster" where this player comes from */
- #endif
- int trace_level; /* Debug flags. 0 means no debugging */
- char *trace_prefix; /* Trace only object which has this as name prefix */
- struct ed_buffer *ed_buffer; /* Local ed */
- int message_length;
- char message_buf[DESIRED_SOCKET_PACKET_SIZE+1];
- struct object *next_player_for_flush, *previous_player_for_flush;
- };
-